<template>
  <div class="dashboard-container">
    <div class="dashboard-text">name: {{ name }}</div>
    <!-- 原生使用 -->
    <!-- <svg>
      <use xlink:href="#icon-chart" />
    </svg> -->
    <!-- 组件使用 -->
    <!-- <svg-icon icon-class="chart" /> -->
    <UploadExcel :on-success="handleSuccess" :before-upload="beforeUpload" />
  </div>
</template>

<script>
import { mapGetters } from 'vuex'

export default {
  name: 'Dashboard',
  computed: {
    ...mapGetters([
      'name'
    ])
  },
  methods: {
    handleSuccess({ header, results }) {
      console.log(header, results)
    },
    beforeUpload(file) {
      console.log(file)
      return false
    }
  }
}
</script>

<style lang="scss" scoped>
.dashboard {
  &-container {
    margin: 30px;
  }
  &-text {
    font-size: 30px;
    line-height: 46px;
  }
}
</style>
